import request from '@/utils/request'

export function getDepartments() {
    return request.get('/company/department')
}

export function getSimpleEmployee() {
    // console.log('发送请求');
    return request.get('/sys/user/simple')
}

export function addDepartments(data) {
    // console.log('发送请求');
    return request.post('/company/department', data)
}

export function delDepartment(id) {
    // console.log('发送请求');
    return request.delete('/company/department/' + id)
}

export function getDepartmentById(id) {
    return request.get('/company/department/' + id)
}

export function editDepartments(data) {
    return request.put('/company/department/' + data.id, data)
}